﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using BucaUIMvc.Repositories.Core;

namespace BucaUIMvc.Repositories
{
    public class PermissionRepository : RepositoryBase,IPermissionRepository
    {
        //public RoleInSiteDto Get(int id)
        //{
        //    throw new NotImplementedException();
        //}

        ///// <summary>
        ///// Checks the exists in role in site.
        ///// </summary>
        ///// <param name="path">The path.</param>
        ///// <param name="perCode">The per code.</param>
        ///// <param name="userId">The user identifier.</param>
        ///// <returns></returns>
        //public PermissionDto CheckExistsInRoleInSite(string path, string perCode, int userId)
        //{
        //    var request = new PermissionRequest().Prepare();
        //    request.LoadOptions = new[] { "CheckExistsInRoleInSite" };
        //    request.Criteria=new PermissionCriteria(){SitePath = path,Code = perCode,UserId = userId};
        //    var response = Client.GetPermissions(request);
        //    Correlate(request, response);
        //    return response.Permission;
        //}
    }
}
